package responses

import (
	"github.com/liyaozong/mengo/contracts/dtos/common"
	"github.com/liyaozong/mengo/contracts/models"
)

type TwoStepCodeResponse struct {
	common.BaseResponse `json:",inline"`
	Code                models.TwoStepCode `json:"result"`
}

type SmsCaptchaResponse struct {
	common.BaseResponse `json:",inline"`
	Code                models.SmsCaptcha `json:"result"`
}

type LoginResponse struct {
	common.BaseResponse `json:",inline"`
	User                models.User `json:"result"`
}

func NewLoginResponse(requestId string, message string, statusCode int, user models.User) LoginResponse {
	return LoginResponse{
		BaseResponse: common.NewBaseResponse(requestId, message, statusCode),
		User:         user,
	}
}
